package multmatrix;

public class Test {
	public static void main(String[] args) {
		MatrixGenerator m=new MatrixGenerator();
		double[][] m1=m.getmatrix(16,16);
		double[][] m2=m.getmatrix(16,16);
		Serial serial=new Serial();
		Simul simul=new Simul();
		System.out.println("serialresult:");
		long a=System.currentTimeMillis();
		output(serial.multi(m1,m2));
		long b=System.currentTimeMillis();
		System.out.println("serialtime:"+(b-a));
		System.out.println("simulresult:");
		long c=System.currentTimeMillis();
		output(simul.multi(m1,m2));
		long d=System.currentTimeMillis();
		System.out.println("simultime:"+(d-c));

	}
	public static void output(double matrix[][]) {
		for(int i=0;i<matrix.length;i++) {
			for(int j=0;j<matrix[0].length;j++) {
				System.out.printf("%.2f", matrix[i][j]);
				System.out.print(" ");
			}
			System.out.println();
		}
	}
}
